3.176 \(\int \frac{\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx\)

Optimal. Leaf size=106 \[ -\frac{4 \sin ^7(c+d x)}{7 a^3 d}+\frac{9 \sin ^5(c+d x)}{5 a^3 d}-\frac{2 \sin ^3(c+d x)}{a^3 d}+\frac{\sin (c+d x)}{a^3 d}+\frac{4 i \cos ^7(c+d x)}{7 a^3 d}-\frac{i \cos ^5(c+d x)}{5 a^3 d} \]

[Out]

((-I/5)*Cos[c + d*x]^5)/(a^3*d) + (((4*I)/7)*Cos[c + d*x]^7)/(a^3*d) + Sin[c + d*x]/(a^3*d) - (2*Sin[c + d*x]^
3)/(a^3*d) + (9*Sin[c + d*x]^5)/(5*a^3*d) - (4*Sin[c + d*x]^7)/(7*a^3*d)

________________________________________________________________________________________

Rubi [A]  time = 0.234448, antiderivative size = 106, normalized size of antiderivative = 1., number of steps used = 13, number of rules used = 8, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.258, Rules used = {3092, 3090, 2633, 2565, 30, 2564, 270, 14} \[ -\frac{4 \sin ^7(c+d x)}{7 a^3 d}+\frac{9 \sin ^5(c+d x)}{5 a^3 d}-\frac{2 \sin ^3(c+d x)}{a^3 d}+\frac{\sin (c+d x)}{a^3 d}+\frac{4 i \cos ^7(c+d x)}{7 a^3 d}-\frac{i \cos ^5(c+d x)}{5 a^3 d} \]

Antiderivative was successfully verified.

[In]

Int[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

((-I/5)*Cos[c + d*x]^5)/(a^3*d) + (((4*I)/7)*Cos[c + d*x]^7)/(a^3*d) + Sin[c + d*x]/(a^3*d) - (2*Sin[c + d*x]^
3)/(a^3*d) + (9*Sin[c + d*x]^5)/(5*a^3*d) - (4*Sin[c + d*x]^7)/(7*a^3*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rule 2565

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> -Dist[(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2564

Int[cos[(e_.) + (f_.)*(x_)]^(n_.)*((a_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Dist[1/(a*f), Subst[Int[
x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Sin[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2] &&
 !(IntegerQ[(m - 1)/2] && LtQ[0, m, n])

Rule 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
 x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rubi steps

\begin{align*} \int \frac{\cos ^4(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx &=\frac{i \int \cos ^4(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac{i \int \left (-i a^3 \cos ^7(c+d x)-3 a^3 \cos ^6(c+d x) \sin (c+d x)+3 i a^3 \cos ^5(c+d x) \sin ^2(c+d x)+a^3 \cos ^4(c+d x) \sin ^3(c+d x)\right ) \, dx}{a^6}\\ &=\frac{i \int \cos ^4(c+d x) \sin ^3(c+d x) \, dx}{a^3}-\frac{(3 i) \int \cos ^6(c+d x) \sin (c+d x) \, dx}{a^3}+\frac{\int \cos ^7(c+d x) \, dx}{a^3}-\frac{3 \int \cos ^5(c+d x) \sin ^2(c+d x) \, dx}{a^3}\\ &=-\frac{i \operatorname{Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}+\frac{(3 i) \operatorname{Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac{\operatorname{Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=\frac{3 i \cos ^7(c+d x)}{7 a^3 d}+\frac{\sin (c+d x)}{a^3 d}-\frac{\sin ^3(c+d x)}{a^3 d}+\frac{3 \sin ^5(c+d x)}{5 a^3 d}-\frac{\sin ^7(c+d x)}{7 a^3 d}-\frac{i \operatorname{Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=-\frac{i \cos ^5(c+d x)}{5 a^3 d}+\frac{4 i \cos ^7(c+d x)}{7 a^3 d}+\frac{\sin (c+d x)}{a^3 d}-\frac{2 \sin ^3(c+d x)}{a^3 d}+\frac{9 \sin ^5(c+d x)}{5 a^3 d}-\frac{4 \sin ^7(c+d x)}{7 a^3 d}\\ \end{align*}

Mathematica [A]  time = 0.0888874, size = 149, normalized size = 1.41 \[ \frac{5 \sin (c+d x)}{16 a^3 d}+\frac{\sin (3 (c+d x))}{8 a^3 d}+\frac{\sin (5 (c+d x))}{20 a^3 d}+\frac{\sin (7 (c+d x))}{112 a^3 d}+\frac{3 i \cos (c+d x)}{16 a^3 d}+\frac{i \cos (3 (c+d x))}{8 a^3 d}+\frac{i \cos (5 (c+d x))}{20 a^3 d}+\frac{i \cos (7 (c+d x))}{112 a^3 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[c + d*x]^4/(a*Cos[c + d*x] + I*a*Sin[c + d*x])^3,x]

[Out]

(((3*I)/16)*Cos[c + d*x])/(a^3*d) + ((I/8)*Cos[3*(c + d*x)])/(a^3*d) + ((I/20)*Cos[5*(c + d*x)])/(a^3*d) + ((I
/112)*Cos[7*(c + d*x)])/(a^3*d) + (5*Sin[c + d*x])/(16*a^3*d) + Sin[3*(c + d*x)]/(8*a^3*d) + Sin[5*(c + d*x)]/
(20*a^3*d) + Sin[7*(c + d*x)]/(112*a^3*d)

________________________________________________________________________________________

Maple [A]  time = 0.149, size = 141, normalized size = 1.3 \begin{align*} 2\,{\frac{1}{d{a}^{3}} \left ({\frac{2\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{9/2\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}+{\frac{{\frac{17\,i}{8}}}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}-4/7\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-7}+{\frac{19}{5\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}-{\frac{15}{4\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{3}}}+{\frac{15}{16\,\tan \left ( 1/2\,dx+c/2 \right ) -16\,i}}+1/16\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) +i \right ) ^{-1} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x)

[Out]

2/d/a^3*(2*I/(tan(1/2*d*x+1/2*c)-I)^6-9/2*I/(tan(1/2*d*x+1/2*c)-I)^4+17/8*I/(tan(1/2*d*x+1/2*c)-I)^2-4/7/(tan(
1/2*d*x+1/2*c)-I)^7+19/5/(tan(1/2*d*x+1/2*c)-I)^5-15/4/(tan(1/2*d*x+1/2*c)-I)^3+15/16/(tan(1/2*d*x+1/2*c)-I)+1
/16/(tan(1/2*d*x+1/2*c)+I))

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [A]  time = 0.470762, size = 205, normalized size = 1.93 \begin{align*} \frac{{\left (-35 i \, e^{\left (8 i \, d x + 8 i \, c\right )} + 140 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 70 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 28 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{560 \, a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

1/560*(-35*I*e^(8*I*d*x + 8*I*c) + 140*I*e^(6*I*d*x + 6*I*c) + 70*I*e^(4*I*d*x + 4*I*c) + 28*I*e^(2*I*d*x + 2*
I*c) + 5*I)*e^(-7*I*d*x - 7*I*c)/(a^3*d)

________________________________________________________________________________________

Sympy [A]  time = 1.1694, size = 199, normalized size = 1.88 \begin{align*} \begin{cases} \frac{\left (- 71680 i a^{12} d^{4} e^{17 i c} e^{i d x} + 286720 i a^{12} d^{4} e^{15 i c} e^{- i d x} + 143360 i a^{12} d^{4} e^{13 i c} e^{- 3 i d x} + 57344 i a^{12} d^{4} e^{11 i c} e^{- 5 i d x} + 10240 i a^{12} d^{4} e^{9 i c} e^{- 7 i d x}\right ) e^{- 16 i c}}{1146880 a^{15} d^{5}} & \text{for}\: 1146880 a^{15} d^{5} e^{16 i c} \neq 0 \\\frac{x \left (e^{8 i c} + 4 e^{6 i c} + 6 e^{4 i c} + 4 e^{2 i c} + 1\right ) e^{- 7 i c}}{16 a^{3}} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**4/(a*cos(d*x+c)+I*a*sin(d*x+c))**3,x)

[Out]

Piecewise(((-71680*I*a**12*d**4*exp(17*I*c)*exp(I*d*x) + 286720*I*a**12*d**4*exp(15*I*c)*exp(-I*d*x) + 143360*
I*a**12*d**4*exp(13*I*c)*exp(-3*I*d*x) + 57344*I*a**12*d**4*exp(11*I*c)*exp(-5*I*d*x) + 10240*I*a**12*d**4*exp
(9*I*c)*exp(-7*I*d*x))*exp(-16*I*c)/(1146880*a**15*d**5), Ne(1146880*a**15*d**5*exp(16*I*c), 0)), (x*(exp(8*I*
c) + 4*exp(6*I*c) + 6*exp(4*I*c) + 4*exp(2*I*c) + 1)*exp(-7*I*c)/(16*a**3), True))

________________________________________________________________________________________

Giac [A]  time = 1.19541, size = 161, normalized size = 1.52 \begin{align*} \frac{\frac{35}{a^{3}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )}} + \frac{525 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 1960 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 4025 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 4480 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 3143 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 1176 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 243}{a^{3}{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{7}}}{280 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^4/(a*cos(d*x+c)+I*a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

1/280*(35/(a^3*(tan(1/2*d*x + 1/2*c) + I)) + (525*tan(1/2*d*x + 1/2*c)^6 - 1960*I*tan(1/2*d*x + 1/2*c)^5 - 402
5*tan(1/2*d*x + 1/2*c)^4 + 4480*I*tan(1/2*d*x + 1/2*c)^3 + 3143*tan(1/2*d*x + 1/2*c)^2 - 1176*I*tan(1/2*d*x +
1/2*c) - 243)/(a^3*(tan(1/2*d*x + 1/2*c) - I)^7))/d